package com.vcredit.creditcat.web.app;

import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.dubbo.config.annotation.Reference;
import com.vcredit.creditcat.api.product.IProductManager;
import com.vcredit.creditcat.dto.product.ProductDetailDto;
import com.vcredit.framework.annotation.Log;

@Controller
@RequestMapping("product")
public class ProductController extends BaseCreditCatController{
	
	@Reference(version = "1.0")
	private IProductManager productManager;

	/**
	 * 产品详细（产品详情H5页面数据）
	 * @author zhaoqi01
	 * @param request
	 */
	@RequestMapping("detail")
	@ResponseBody
	@Log
	public ProductDetailDto detail(@RequestBody Map<String,String> paramMap) {
		Long productId = Long.parseLong(paramMap.get("productId"));
		return productManager.detail(productId);
	}
}
